﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Main/Main.master" AutoEventWireup="false" CodeFile="Blog.aspx.vb" Inherits="Main_Blog" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ListView ID="ListView1" runat="server" DataSourceID="DSBDet" 
        DataKeyNames="ID">
        <AlternatingItemTemplate>
            <span style="">Title:
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            <br />
            Create Date:
            <asp:Label ID="CDateLabel" runat="server" Text='<%# Eval("CDate") %>' />
            <br />
            Created By:
            <asp:Label ID="NeighborLabel" runat="server" Text='<%# Eval("Neighbor") %>' />
            <br />
            Description:
            <asp:Label ID="BDescriptionLabel" runat="server" 
                Text='<%# Eval("BDescription") %>' />
            <br />
            <a href='BlogDetails.aspx?ID=<%# Eval("ID") %>'>Add A Post:</a>
            <br />
            </span>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <span style="">Title:
            <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
            <br />
            CDate:
            <asp:TextBox ID="CDateTextBox" runat="server" Text='<%# Bind("CDate") %>' />
            <br />
            Neighbor:
            <asp:TextBox ID="NeighborTextBox" runat="server" 
                Text='<%# Bind("Neighbor") %>' />
            <br />
            BDescription:
            <asp:TextBox ID="BDescriptionTextBox" runat="server" 
                Text='<%# Bind("BDescription") %>' />
            <br />
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                Text="Update" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Cancel" />
            <br />
            <br />
            </span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <span style="">Title:
            <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
            <br />
            CDate:
            <asp:TextBox ID="CDateTextBox" runat="server" Text='<%# Bind("CDate") %>' />
            <br />
            Neighbor:
            <asp:TextBox ID="NeighborTextBox" runat="server" 
                Text='<%# Bind("Neighbor") %>' />
            <br />
            BDescription:
            <asp:TextBox ID="BDescriptionTextBox" runat="server" 
                Text='<%# Bind("BDescription") %>' />
            <br />
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                Text="Insert" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Clear" />
            <br />
            <br />
            </span>
        </InsertItemTemplate>
        <ItemTemplate>
            <span style="">Title:
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            <br />
            Created Date:
            <asp:Label ID="CDateLabel" runat="server" Text='<%# Eval("CDate") %>' />
            <br />
            Created By:
            <asp:Label ID="NeighborLabel" runat="server" Text='<%# Eval("Neighbor") %>' />
            <br />
            Description:
            <asp:Label ID="BDescriptionLabel" runat="server" 
                Text='<%# Eval("BDescription") %>' />
            <br />
           
            <a href='BlogDetails.aspx?ID=<%# Eval("ID") %>'>Add A Post:</a>
            <br />
            </span>
        </ItemTemplate>
        <LayoutTemplate>
            <div ID="itemPlaceholderContainer" runat="server" 
                style="">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="">
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="">Title:
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            <br />
            CDate:
            <asp:Label ID="CDateLabel" runat="server" Text='<%# Eval("CDate") %>' />
            <br />
            Neighbor:
            <asp:Label ID="NeighborLabel" runat="server" Text='<%# Eval("Neighbor") %>' />
            <br />
            BDescription:
            <asp:Label ID="BDescriptionLabel" runat="server" 
                Text='<%# Eval("BDescription") %>' />
            <br />
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            <br />
            </span>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="DSBDet" runat="server" 
        ConnectionString="<%$ ConnectionStrings:myFirstDatabase %>" 
        ProviderName="<%$ ConnectionStrings:myFirstDatabase.ProviderName %>" 
        SelectCommand="SELECT * FROM [VBlogDesc]"></asp:SqlDataSource>
<br />

</asp:Content>

